package Test1;

import Final.SelectById;
import Test1.SelectByName;
import Test1.SelectByOrigin;

import javax.swing.*;
import java.awt.*;

class Select_Menu extends JFrame{
    public Select_Menu(){
        JFrame jFrame = new JFrame();

        JPanel jp = new JPanel();
        jFrame.add(jp);
        jp.setOpaque(false);
        jFrame.setSize(500,300);
        Container cp = jFrame.getContentPane();
        cp.setLayout(null);

        ((JPanel)cp).setOpaque(false);


        JLabel j1=new JLabel("~~请在左侧选择所做的操作~~");

        JButton b1=new JButton("按id查询");

        JButton b2=new JButton("按名字查询");

        JButton b3 = new JButton("按籍贯查询");

        cp.add(j1);

        j1.setBounds(220,130,190,25);

        cp.add(b1);

        b1.setBounds(0, 60, 100, 25);

        cp.add(b2);

        b2.setBounds(0, 130, 100, 25);

        cp.add(b3);

        b3.setBounds(0, 200, 100, 25);





        jFrame.setVisible(true);

        b2.addActionListener(e -> {

            new SelectByName();

        });

        b1.addActionListener(e -> {

            new SelectById();

        });

        b3.addActionListener(e -> {
            new SelectByOrigin();
        });

    }


}
